str1 = '今天天气很好，我们开始学习python'
str2 = '挺有意思'
# otp
length = len(str1)
print(length)
print(str1[-6])
# 切片
# str1[开始的索引（默认是0）: 结束的索引（默认-1）包前不包后 :步长和方向]
# print(str1[2:4])
# print(str1[-6:0])
# print(str1[1:7:1])
# print(str1[-2:-7:-2])
print(str1+str2)
# + 相当于拼接字符串
#
# print('*'*50 )
# print('秦职\t'*50 )
str3 = '小明说：\n\'python挺简单\''
path = r'D:\node\thon\python软件、资料包\课件笔记'
print(str3)
print (path)
str4 = '中国'
# str5 = 'a'
result = str4.encode ('utf-8') #'\xe4\xb8\xad\xe5\x9b\xbd'
print (result)
# print (str4.encode ('gb2312'))
#
# print (str4.encode ('gbk'))
print(result.decode('utf-8'))